//
//  SongMenuModel.m
//  NewMusic
//
//  Created by chuxinyu123 on 15/11/14.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "SongMenuModel.h"

@implementation SongMenuModel

- (void)dealloc
{
    [_title release];
    [_ID release];
    [_desc release];
    [_listen_count release];
    [_pic_url release];
    [_quan_id release];
    [_song_list release];
    [super dealloc];
}
- (instancetype)initWithDictionary:(NSDictionary *)dictionary
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}

+ (SongMenuModel *)songMenuModelWithDictionary:(NSDictionary *)dictionary
{
    SongMenuModel *songMenuModel = [[SongMenuModel alloc] initWithDictionary:dictionary];
    return [songMenuModel autorelease];
}


- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqual:@"_id"]) {
        self.ID = [NSString stringWithFormat:@"%@", value];
    }
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqual:@"listen_count"]) {
        self.listen_count = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqual:@"quan_id"]) {
        self.quan_id = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqual:@"song_list"]) {
        self.listen_count = [NSString stringWithFormat:@"%@", value];
    }else{
        [super setValue:value forKey:key];
    }
}
@end
